package com.witsight.cassandra.model;


import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;

import com.witsight.cassandra.model.BaseEntity;

/**   
 * 说明：例子
 * @Title: Simple.java 
 * @Package com.witsight.cassandra.util.model 
 * @See: {@link BaseEntity}
 * Copyright: Copyright (c) 2017
 * Company:sany huax witsight team by product
 * @author: penght  
 * @date: 2017年9月21日 下午2:59:45 
 * @version: V1.0
 *
 */
@Table(value = "simple")
public class pht extends BaseEntity<SimpleKey> {
	private static final long serialVersionUID = -4357213382814810834L;


	@PrimaryKey
	private SimpleKey id;


	private Date createTime;

	@Override
	public SimpleKey getId() {
		return id;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE)
				.append(super.toString())
				.append(this.createTime)
				.toString();
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof pht)) {
			return false;
		}

		final pht simple = (pht) o;
		return !(this.getId() != null ? !this.getId().equals(simple.getId()) : simple.getId() != null);
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}
